class CreateTrains < ActiveRecord::Migration
  def change
    create_table :trains do |t|

      t.string :number, :index => true #列车号码，并建立索引

      t.timestamps null: false
    end
  end
end
